"""
对话上下文 ConversationBuferMemory
无限存储
"""
from langchain.memory import ConversationBufferMemory

history = ConversationBufferMemory()
"""
每次只存储一轮
"""
history.save_context({"input": "你好"}, {"output": "你好！"})

print(history.load_memory_variables({}))

history.save_context({"input": "你好2"}, {"output": "你好2！"})

print(history.load_memory_variables({}))
